<?php

use Illuminate\Database\Seeder;

class HouseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // 水, 电, 煤, 物业费, 垃圾费, 网费,


        $house = \App\Models\House::query()->create([
            'name' => '佛山碧桂园',
            'address' => [
                'province' => '广东省',
                'city' => '佛山市',
                'area' => '南海区',
                'address' => '罗村隧道旁'
            ],
            'description' => '罗村隧道旁',
            'status' => 1,
        ]);

        $building1 = \App\Models\Building::query()->create([
            'house_id' => $house->id,
            'name' => '1号楼',
            'floor' => 18,
            'description' => 'test',
            'is_rent' => false
        ]);

        $building2 = \App\Models\Building::query()->create([
            'house_id' => $house->id,
            'name' => '2号楼',
            'floor' => 18,
            'description' => 'test',
            'is_rent' => false
        ]);

        $building3 = \App\Models\Building::query()->create([
            'house_id' => $house->id,
            'name' => '3号楼',
            'floor' => 28,
            'description' => 'test',
            'is_rent' => false
        ]);

        $room1 = \App\Models\Room::query()->create([
            'building_id' => $building1->id,
            'name' => '101',
            'description' => 'test',
            'is_rent' => false
        ]);

        $room2 = \App\Models\Room::query()->create([
            'building_id' => $building1->id,
            'name' => '101',
            'description' => 'test',
            'is_rent' => false
        ]);

        $room3 = \App\Models\Room::query()->create([
            'building_id' => $building3->id,
            'name' => '101',
            'description' => 'test',
            'is_rent' => false
        ]);

        $room4 = \App\Models\Room::query()->create([
            'building_id' => $building2->id,
            'name' => '101',
            'description' => 'test',
            'is_rent' => false
        ]);

        $room5 = \App\Models\Room::query()->create([
            'building_id' => $building2->id,
            'name' => '101',
            'description' => 'test',
            'is_rent' => false
        ]);

        $room6 = \App\Models\Room::query()->create([
            'building_id' => $building3->id,
            'name' => '101',
            'description' => 'test',
            'is_rent' => false
        ]);
    }
}
